@echo off

set ZEPHYR_BASE=D:/hd-workplace/Apache/zephyr/zephyr

set ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
set GNUARMEMB_TOOLCHAIN_PATH=C:/Program Files (x86)/GNU Tools Arm Embedded/7 2018-q2-update

rem set USER_BOARD=stm32f4_disco
set USER_BOARD=stm32f4_hd
set USER_BOARD_ROOT=%cd%

rem cmake --clean-first
rem cmake -GNinja -DBOARD=%USER_BOARD% -DBOARD_ROOT=%USER_BOARD_ROOT% app\blinky
rem cmake -G"Eclipse CDT4 - Unix Makefiles" -DBOARD=%USER_BOARD% -DBOARD_ROOT=%USER_BOARD_ROOT% app\blinky
cmake -G"Eclipse CDT4 - MinGW Makefiles" -DBOARD=%USER_BOARD% -DBOARD_ROOT=%USER_BOARD_ROOT% app\synchronization

rem ninjia
rem ninjia run
rem ninjia flash

rem DEBUG
rem zephyr/zephyr.elf
rem openocd -f .\boards\arm\stm32f4_hd\support\openocd.cfg
rem telnet localhost 4444
rem reset halt
rem flash erase 0 0 last
rem flash write_image zephyr/zephyr.elf
rem reset
